<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML>
<html>
<head>
    <%@ include file="/platform/style.jsp"%>
</head>
<body class="easyui-layout">
<style>
    .classpro{
        display: none;
    }
    .ui-formContent select {
        height: 20px;
        font-size: 14px;
    }
    .ui-pagination .page_input input{
        height:18px;
        line-height:18px;
    }
    #errormsg{
        position: fixed;
        width: 200px;
        height: 50px;
        line-height: 50px;
        padding: 1px 5px;
        text-align: center;
        background-color: #00A4F2;
        opacity: 0.5;
        color: #fff;
        left: 50%;
        margin-left: -50px;
        top: 50%;
        border-radius: 20px;
        z-index: 100000000;
    }
    .ui_td td{
        background:#ffffff;
        color:#797979;
        height:25px;
        font-size:14px;
        border-bottom:1px solid #EEEEEE;
        padding-left:3px;
        cursor: pointer;
    }
</style>
<div data-options="region:'center'" class="bodybg">
    <!-- 查询区域 -->
    <form id="dataForm" action="/marketing/BuySendPromotionPage@chooseProductList.page" method="post">
        <w:hidden bind="bean.id" />
        <div class="ui_line" style="margin-top:10px"></div>
        <w:hidden bind="pageSize_" value="10"/>
        <w:hidden bind="pageNum" value="1"/>
        <w:hidden bind="bean.pname"/>
        <w:hidden bind="bean.code"/>
        <w:hidden bind="bean.classid"/>

        <!-- 数据列表区域 -->
        <div id="seetab" style="border: 1px solid #DDDDDD;">
            <table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:true,
																							pageNum:<w:write bind="pageNum" />,
																							pageSize:<w:write bind="10"/>,
																							total:<w:write bind="pagination.totalCount"/>,form:'dataForm'">
                <thead>
                <tr class="ui_th">
                    <td width="40">商品编码</td>
                    <td width="100">商品名称</td>
                    <td width="160">生产厂家</td>
                    <td width="160">规格</td>
                    <td width="160">商品分类</td>
                    <td width="80">库存</td>
                    <td width="80">促销类型</td>
                    <td width="80">操作</td>
                </tr>
                </thead>
                <tbody id="prolist">
                <w:iterate id="info" bind="resultList_">
                    <tr class="ui_td" >
                        <input type="hidden" name="showlistname" value="<w:write bind="#info.pname"/>">
                        <input type="hidden" name="showlistid" value="<w:write bind="#info.id"/>">
                        <input type="hidden" name="showlistcode" value="<w:write bind="#info.code"/>">
                        <input type="hidden" name="showlistB_chanjia" value="<w:write bind="#info.B_chanjia"/>">
                        <input type="hidden" name="showlistB_guige" value="<w:write bind="#info.B_guige"/>">
                        <input type="hidden" name="showlistclassname" value="<w:write bind="#info.classname"/>">
                        <input type="hidden" name="showlistproductamount" value="<w:write bind="#info.productamount"/>">
                        <input type="hidden" name="showlisttypes" value="<w:write bind="#info.moneyofftype"/>">
                        <w:define id="info_types" bind="#info.moneyOffType" ></w:define>
                        <td><w:write bind="#info.code"/></td>
                        <td><w:write bind="#info.pname"/></td>
                        <td><w:write bind="#info.B_chanjia"/></td>
                        <td><w:write bind="#info.B_guige"/></td>
                        <td><w:write bind="#info.classname"/></td>
                        <w:define id="info_productamount" bind="#info.productamount" ></w:define>
                        <w:switch>
                            <w:case bind="#info_productamount <100" >
                                <td style="color: red"><w:write bind="#info.productamount"/></td>
                            </w:case>
                            <w:case bind="#info_productamount >= 100">
                                <td><w:write bind="#info.productamount"/></td>
                            </w:case>
                        </w:switch>
                        <td><w:write bind="#info.moneyOffType"/></td>
                        <td align="center">
                            <w:switch>

                                <w:case bind="#info_types.indexOf('买送促销') >= 0">
                                    <input type="radio" name="primaryKey" disabled="disabled">
                                </w:case>
                                <w:else>
                                    <input type="radio" name="primaryKey" onclick="inp(this)" value="<w:write bind="#info.id"/>">
                                </w:else>
                            </w:switch>

                        </td>
                    </tr>
                </w:iterate>


                </tbody>
            </table>
        </div>
        <div id="seestab" style="border: 1px solid #DDDDDD;display: none;">
            <table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:false">
                <thead>
                <tr class="ui_th">
                    <td width="40">商品编码</td>
                    <td width="100">商品名称</td>
                    <td width="160">生产厂家</td>
                    <td width="160">规格</td>
                    <td width="160">商品分类</td>
                    <td width="80">库存</td>
                    <td width="80">促销类型</td>
                    <td width="80">操作</td>
                </tr>
                </thead>
                <tbody id="pro">
                <tr  class="ui_td">
                    <td id="td1"></td>
                    <td id="td2"></td>
                    <td id="td3"></td>
                    <td id="td4"></td>
                    <td id="td5"></td>
                    <td id="td6"></td>
                    <td id="td7"></td>
                    <td id="td8" align="center" style="color: red;" id="deletepro" onclick="deletepro(this)">
                        删除
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </form>
</div>
</body>
</html>
